package com.ideal.frame.sys.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ideal.frame.entity.AutoModel;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Data
@Entity
@Table(name = "t_sys_address")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class SysAddress extends AutoModel {
    private Long parentId;
    private String label;
    private String code;
    private boolean delFlag;
    private Long createUserId;
    private Long updateUserId;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "GMT+8")
    private Date updateTime;
//    @OneToMany(fetch = FetchType.EAGER)
//    @JoinColumn(name = "parentId", referencedColumnName = "id")
//    private List<SysAddress> children;
}
